package com.jg.visitor.schedule;

import com.jg.visitor.service.GlobalConfigService;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;

@EnableScheduling
@Component
public class LicenseCheckTask {
    @Resource
    private GlobalConfigService globalConfigService;

    @Scheduled(cron = "0 0/30 * * * ? ")
    public void checkLicense(){
        globalConfigService.checkLicense();
    }
}
